<?php

class Install_Form_Setup_Account extends Nuo_Form
{
	public function init()
	{

		// email
		$this -> addElement('text', 'email', array(
				'label' => 'email',
				'required' => true,
				'value' => 'admin@yoursite.com',
				'class'=>'text long-text',
				'validators' => array('EmailAddress')
		));

		// username
		$this -> addElement('text', 'username', array(
				'label' => 'username',
				'required' => true,
				'value'=>'admin',
				'class'=>'text long-text',
				'validators' => array('Alnum')
		));

		// username
		$this -> addElement('text', 'displayname', array(
				'label' => 'displayname',
				'class'=>'text long-text',
				'value'=>'admin',
				'required' => true,
		));

		// password
		$this -> addElement('password', 'password', array(
				'label' => 'password',
				'required' => true,
				'class'=>'password long-text',
				'validators' => array( array(
							'StringLength',
							false,
							array(
									4,
									8
							)
					))
		));

		// password confirm
		$this -> addElement('password', 'password2', array(
				'label' => 'confirm password',
				'class'=>'password long-text',
				'required' => true,
		));

		// submit button
		$this -> addElement('button', '_submit', array(
				'label' => 'submit',
				'value' => 'submit',
				'class'=>'submit',
				'type' => 'submit',
		));
	}

	// confirm password
	public function validatorConfirmPassword($value, $form)
	{
		return false;
	}

}
